#include "AllegroResource.hpp"

int AllegroResource::m_iRefCount = 0;

AllegroResource::AllegroResource()
{
	if (m_iRefCount++==0)
	{
		allegro_init();     // no check since it is very unlikely to fail
	}
}

AllegroResource::~AllegroResource()
{
	if (--m_iRefCount==0)
	{
		allegro_exit();     // no check since it is very unlikely to fail
	}
}
